import { useStorage } from '@vueuse/core'

const TokenKey = 'Admin-Token';
const OaTickket = 'Oa-Tickket';
const tokenStorage = useStorage(TokenKey, null);
const oaTickketStorage = useStorage(OaTickket, null);
export const getOaTickket = () => oaTickketStorage.value;
export const getToken = () => tokenStorage.value;

export const setOaTickket = (oa_tickket) => (oaTickketStorage.value = oa_tickket);
export const setToken = (access_token) => (tokenStorage.value = access_token);

export const removeOaTickket = () => (oaTickketStorage.value = null);
export const removeToken = () => (tokenStorage.value = null);
